import { WechatUserInfoQr } from '@/components/wechat/WechatUserInfoQr'
import { useAuth } from '@/hooks/useAuth'
import { MenberLayout } from '../MenberLayout'

export const Wechat = () => {
  const { user } = useAuth()
  return (
    <MenberLayout description={user('openid') ? '已经绑定微信' : '请绑定微信'}>
      <WechatUserInfoQr action="wechat/qr/bind" onSuccess={() => location.reload()} />
    </MenberLayout>
  )
}
